import java.awt.geom.*;
import java.awt.*;

public class JShape2D implements serializable{
	enum Status {LINE, RECTANGLE, CIRCLE};
	private Point pointA;
	private Point pointB;
	private Point center;
	public Status status;
	public Color JS2Dcolor;
	private int width, height;
	private Line2D.Double line;
	private Ellipse2D.Double circle;
	private Rectangle2D.Double rectangle;
	
	public JShape2D(int x1, int y1, int x2, int y2, Status s, Color color){
		pointA = new Point(x1,y1);
		pointB = new Point(x2,y2);
		width = x2-x1;
		height = y2-y1;
		center = new Point(width/2, height/2);
		status = s;
		line = new Line2D.Double(x1,y1,x2,y2);
		circle = new Ellipse2D.Double (x1,y1,width,height);
		rectangle = new Rectangle2D.Double (x1,y1,width,height);
		JS2Dcolor = color;
		
	}
	
	public Line2D.Double getLine2D(){
		return line;
	}
	
	public Ellipse2D.Double getCircle2D(){
		return circle;
	}
	
	public Rectangle2D.Double getRectangle2D(){
		return rectangle;
	}
}